import os

class Stream:
    """
    Data transfering one way.
    """
    def __init__(self):
        self.downstream = []

    def write(self, data):
        """
        Write data to all downstreams.
        """
        for downstream in self.downstream:
            downstream.write(data)

    def addOutBranch(self, outstream):
        self.downstream.append(outstream)
    
    def open(self):
        pass
    
    def close(self):
        pass
    
    def tell(self):
        pass
    
    #def seek(self, offset, whence = os.SEEK_SET):
    #    pass
        

